package com.ganbo.stock.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;


@AllArgsConstructor
public enum FundType {


    STOCK(1, "股票型"),
    BOND(2, "债券型"),
    MIX(3, "混合型"),
    EXPONENT(5, "指数型"),
    QDII(11, "QDII型");

    @Getter
    private Integer code;
    @Getter
    private String desc;


    public static String findDescByCode(Integer code) {
        for (FundType status : values()) if (status.getCode().equals(code)) return status.getDesc();
        return StringUtils.EMPTY;
    }

}
